import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { ExamsService } from './exams.service';
import { ExamsController } from './exams.controller';
import { Exam, ExamSchema } from '../schemas/exams/exam.schema';
import { Question, QuestionSchema } from '../schemas/questions/question.schema';
import { ExamRecord, ExamRecordSchema } from '../schemas/exam-records/exam-record.schema';
import { ExamQuestion, ExamQuestionSchema } from '../schemas/exam-question/exam-question.schema';
import { QuestionGroup, QuestionGroupSchema } from '../schemas/question-group/question-group.schema';

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: Exam.name, schema: ExamSchema },
      { name: Question.name, schema: QuestionSchema },
      { name: ExamRecord.name, schema: ExamRecordSchema },
      { name: ExamQuestion.name, schema: ExamQuestionSchema },
      { name: QuestionGroup.name, schema: QuestionGroupSchema }
    ]),
  ],
  providers: [ExamsService],
  controllers: [ExamsController],
})
export class ExamsModule {}